<template>
  <div>
    <ul>
      <li v-for="(item,id) in arr" :key="id">
        <!-- {{id}} -->
        <p>{{item.goodsname}}</p>
        <p>{{item.price}}</p>
        <img :src="`https://api.aslegou.top` + item.img" alt=""  />
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      id:"",
      arr: [],
    };
  },
  created() {
    this.id=this.$route.query.id
    this.getlist();
  },
  methods: {
    async getlist() {
      var data = await this.$http({
        // url: `/api/getgoodsinfo/detail?id` + this.id,
        url: '/api/getgoodsinfo',
        params:{id :this.id}
      });
      console.log(data.data.list);
      this.arr=data.data.list
    },
  },
};
</script>

<style lang="scss" scoped>
</style>